/*4.10 对话框
	Name:			mod_modal
	Example:
<div id="modal-demo" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h3 id="myModalLabel">对话框标题</h3>
				<a class="close" data-dismiss="modal" aria-hidden="true" href="javascript:void();">×</a>
			</div>
			<div class="modal-body">
				<p>对话框内容…</p>
			</div>
			<div class="modal-footer">
				<button class="btn btn-primary">确定</button> <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
			</div>
		</div>
	</div>
</div>
*/

.fade {
    opacity: 0;
    -webkit-transition: opacity .15s linear;
    -o-transition: opacity .15s linear;
    transition: opacity .15s linear;
    &.in {
        opacity: 1
    }
}

.modal {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: none;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    outline: 0;
    &.fade .modal-dialog {
        -webkit-transition: -webkit-transform .3s ease-out;
        -o-transition: -o-transform .3s ease-out;
        transition: transform .3s ease-out;
        -webkit-transform: translate(0, -50%);
        -ms-transform: translate(0, -50%);
        -o-transform: translate(0, -50%);
        transform: translate(0, -50%)
    }
    &.in .modal-dialog {
        -webkit-transform: translate(0, 0);
        -ms-transform: translate(0, 0);
        -o-transform: translate(0, 0);
        transform: translate(0, 0)
    }
    .modal-dialog {
        position: relative;
        margin: 10px;
        .modal-content {
            position: relative;
            background-color: #fff;
            border: 1px solid #999;
            border: 1px solid rgba(0, 0, 0, .2);
            outline: 0;
            -webkit-background-clip: padding-box;
            background-clip: padding-box;
            -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
            box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
            .modal-header {
                min-height: 16.42857143px;
                padding: 15px;
                border-bottom: 1px solid #eee;
                position: relative;
                .close {
                    position: absolute;
                    right: 10px;
                    top: 10px
                }
                h3,
                .modal-title {
                    margin: 0;
                    padding: 10px 0;
                    font-size: 16px
                }
            }
            .modal-body {
                position: relative;
                padding: 15px;
                overflow-y: visible;
                word-break: break-all;
                .modal-form {
                    margin-bottom: 0;
                }
            }
            .modal-footer {
                padding: 15px;
                margin-bottom: 0;
                text-align: right;
                background-color: #f5f5f5;
                border-top: 1px solid #eee;
                *zoom: 1;
                &:before,
                &:after {
                    display: table;
                    content: ""
                }
                &:after {
                    clear: both
                }
                .btn+.btn {
                    margin-left: 5px;
                    margin-bottom: 0
                }
                .btn-group .btn+.btn {
                    margin-left: -1px
                }
                .btn-block+.btn-block {
                    margin-left: 0
                }
            }
        }
    }
    &.radius{
        .modal-content {
            border-radius: 6px;
            .modal-footer {
                border-bottom-left-radius: 6px;
                border-bottom-right-radius: 6px
            }
        } 
    }
    .modal-backdrop {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background-color: #000;
        &.fade {
            filter: alpha(opacity=0);
            opacity: 0;
        }
        &.in {
            filter: alpha(opacity=50);
            opacity: .5
        }
    }
    .modal-scrollbar-measure {
        position: absolute;
        top: -9999px;
        width: 50px;
        height: 50px;
        overflow: scroll
    }
    &.middle .modal-dialog {
        position: absolute;
        margin: 10px;
        left: 0;
        right: 0;
        top: 50%
    }
    &.fade.middle .modal-dialog {
        -webkit-transform: translate(0, -100%);
        -ms-transform: translate(0, -100%);
        -o-transform: translate(0, -100%);
        transform: translate(0, -100%)
    }
    &.in.middle .modal-dialog {
        -webkit-transform: translate(0, -50%);
        -ms-transform: translate(0, -50%);
        -o-transform: translate(0, -50%);
        transform: translate(0, -50%)
    }
}
.modal-open {
    overflow: hidden;
}
.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto
}

/*上下居中*/
@media (min-width: 768px) {
    .modal-dialog {
        width: 600px;
        margin: 30px auto;
        .modal-content {
            -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
            box-shadow: 0 5px 15px rgba(0, 0, 0, .5)
        }
    }
    .modal.middle .modal-dialog {
        margin: 10px auto
    } 
    .modal-sm {
        width: 300px
    }
}

@media (min-width: 992px) {
    .modal-lg {
        width: 900px
    }
}

.modal-alert {
    position: fixed;
    right: auto;
    bottom: auto;
    width: 300px;
    left: 50%;
    margin-left: -150px;
    top: 50%;
    margin-top: -30px;
    z-index: 9999;
    background-color: #fff;
    border: 1px solid #999;
    border: 1px solid rgba(0, 0, 0, .2);
    outline: 0;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
    box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
    .modal-alert-info {
        padding: 30px;
        text-align: center;
        font-size: 14px;
        background-color: #fff
    }
}

.loading {
    height: 50px;
    background: url(../images/loading/loading-b.gif) no-repeat center
}

.mask {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    -moz-transition: all 0.3s ease-in;
    -webkit-transition: all 0.3s ease-in;
    -o-transition: all 0.3s ease-in;
    transition: all 0.3s ease-in
}

* html .mask {
    position: absolute;
    left: expression(documentElement.scrollLeft + documentElement.clientWidth - this.offsetWidth);
    top: expression(documentElement.scrollTop + documentElement.clientHeight - this.offsetHeight);
}

.mask_box {
    background-image: none;
    display: none;
    z-index: 99
}

.hover .mask_box {
    position: absolute;
    bottom: 0;
    left: 0;
    display: block;
    background-color: rgba(0, 0, 0, 0.3);
    text-align: left
}

.modal-open{
    .dropdown-menu {
        z-index: 2050
    }
    .dropdown.open {
        *z-index: 2050
    }
    .popover {
        z-index: 2060
    }
    .tooltip {
        z-index: 2070
    }
}